package 设计模式.单例模式;

/**
 * @description:
 * @author: asd
 * @time: 2022/11/18 23:28
 */
public class StaticSingleton {
    private static volatile StaticSingleton singleton;
    private StaticSingleton(){
    }
    private static class  Single{
        private static final StaticSingleton SINGLETON = new StaticSingleton();
    }
    public static synchronized StaticSingleton getSingleton(){
        return Single.SINGLETON;
    }
}
